import {pageModalTip as pagetip, filterIp, filterPort} from '/js/usemain.js';

/* jQuery.get(url, [data], [callback], [type]) */
/**
 * 预览JSON
 * @returns
 */
function previewJson() {
	console.info('function previewJson');
	$.get('../nginxserver/previewjson', function(result) {
		if (result.status>=0) {
			if (result.data) {
				let jo = JSON.parse(result.data);
				console.info(eval(jo.computerSelf));
				console.info(eval(jo.computerList));
				console.info(eval(jo.serviceList));
			}
		} else {
			if (result.tips && result.tips.length>0) {
				alert(result.tips);
			} else {
				alert('获取JSON失败');
			}
		}
	});
}

export { previewJson };